package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.admin.company.entity.Post;
import com.fz.us.admin.company.entity.User;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by dzw on 2017/12/12.
 * 离职申请
 */
@Entity
@Table(name="ec_quit")
public class Quit extends BaseFlowEntity {
    private static final long serialVersionUID = -2943272409586362458L;

    /**
     * 离职人员
     */
    private User quitUser;
    /**
     * 入职日期
     */
    private Date entryDate;
    /**
     * 离职日期
     */
    private Date quitDate;
    /**
     * 所属岗位
     */
    private Post thePost;
    /**
     * 交接人员
     */
    private User nextUser;
    /**
     * 劳动合同开始日期
     */
    private Date contractStartDate;
    /**
     * 劳动合同结束日期
     */
    private Date contractEndDate;
    /**
     * 离职原因
     */
    private String quitReason;
    /**
     * 所需交接事项
     */
    private String theThing;

    @ManyToOne(fetch = FetchType.LAZY)
    public User getQuitUser() {
        return quitUser;
    }

    public void setQuitUser(User quitUser) {
        this.quitUser = quitUser;
    }

    public Date getEntryDate() {
        return entryDate;
    }

    public void setEntryDate(Date entryDate) {
        this.entryDate = entryDate;
    }

    public Date getQuitDate() {
        return quitDate;
    }

    public void setQuitDate(Date quitDate) {
        this.quitDate = quitDate;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public Post getThePost() {
        return thePost;
    }

    public void setThePost(Post thePost) {
        this.thePost = thePost;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public User getNextUser() {
        return nextUser;
    }

    public void setNextUser(User nextUser) {
        this.nextUser = nextUser;
    }

    public Date getContractStartDate() {
        return contractStartDate;
    }

    public void setContractStartDate(Date contractStartDate) {
        this.contractStartDate = contractStartDate;
    }

    public Date getContractEndDate() {
        return contractEndDate;
    }

    public void setContractEndDate(Date contractEndDate) {
        this.contractEndDate = contractEndDate;
    }

    public String getQuitReason() {
        return quitReason;
    }

    public void setQuitReason(String quitReason) {
        this.quitReason = quitReason;
    }

    public String getTheThing() {
        return theThing;
    }

    public void setTheThing(String theThing) {
        this.theThing = theThing;
    }
}
